import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    component: () => import("../Login.vue")
  },
  {
    path: "/home",
    component: () => import("../Home.vue"),
    redirect: "/vue-app-one",
    children: [
      {
        path: "/vue-app-one*",
        component: () => import("../views/app-one/AppOne.vue")
      },
      {
        path: "/vue-app-two*",
        component: () => import("../views/app-two/AppTwo.vue")
      }
    ]
  }
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes
});

export default router;
